InitPart
TheInitPart
method initializes this part object.
void InitPart (in ODStorageUnit storageUnit, in ODPart partWrapper);
storageUnit
- A reference to an empty storage unit to be used by this part as its primary persistent storage.
partWrapper
- A reference to a part wrapper representing this part.
DISCUSSION
OpenDoc calls this method only once for the persistent lifetime of this part, when it is first created and has no stored data to read. After this method executes successfully, this part object is initialized and ready for use.Your part's
InitPart
method, rather than itssomInit
method, should handle any initialization code that can potentially fail. Your part'sInitPart
method may attempt to allocate memory for your part instance, get resources that your part might need, or set up your part's persistent storage.The inherited
InitPart
method creates and stores thekODPropCreateDate
,kODPropModDate
, andkODPropModUser
properties; your part's storage unit automatically maintains thekODPropModDate
andkODPropModUser
properties.OVERRIDING
When you subclassODPart
, you must override this method. Your override method must call its inherited method at the beginning of your implementation.SEE ALSO
"The InitPart Method" on page 40 in OpenDoc Cookbook.
Table 2-1 on page 89 in OpenDoc Programmer's Guide.
"The InitPart Method" on page 293 in OpenDoc Programmer's Guide.
"The Part-Wrapper Object" on page 464 in OpenDoc Programmer's Guide.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help